import { IsNotEmpty, IsOptional } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { Role } from '@common/role';
import { Gender } from '../entities/user.entity';
export class UserCreateDto {
    /**
     * 用户名
     */
    @ApiProperty({
        description: '用户名',
        required: true,
    })
    @IsNotEmpty({
        message: '用户名不能为空',
    })
    username: string;

    /**
     * 密码
     */
    @ApiProperty({
        description: '密码',
        required: true,
    })
    @IsNotEmpty({
        message: '密码不能为空',
    })
    password: string;

    /**
     * 性别
     */
    @ApiProperty({
        description: '性别',
        required: true,
    })
    @IsNotEmpty({
        message: '性别不能为空',
    })
    gender: Gender;

    /**
     * 手机号
     */
    @ApiProperty({
        description: '手机号',
        required: true,
    })
    @IsNotEmpty({
        message: '手机号不能为空',
    })
    phone: string;

    /**
     * 昵称
     */
    @ApiProperty({
        description: '昵称',
        required: true,
    })
    @IsNotEmpty({
        message: '昵称不能为空',
    })
    nickname: string;

    /**
     * 角色
     */
    @ApiProperty({
        description: '角色',
        required: true,
    })
    @IsNotEmpty({
        message: '角色不能为空',
    })
    roles: Role[];

}
